<template>
    <div class="chart-container">
      <h2>组件</h2>
      <div class="chart-grid">
        <div class="chart-card" v-for="chart in charts" :key="chart.name">
          <div class="chart-info">
            <span class="chart-name">{{ chart.name }}</span>
            <span class="chart-version">{{ chart.version }}</span>
          </div>
          <button class="view-btn">{{ chart.btnText }}</button>
        </div>
      </div>
    </div>
  </template>
  
  <script setup>
  const charts = [
    { name: '条形图', version: '1.0.0', btnText: '查看' },
    { name: '折线图', version: '1.0.0', btnText: '查看' },
    { name: '饼图', version: '1.0.0', btnText: '查看' },
    { name: '仪表盘', version: '1.0.0', btnText: '查看' }
  ];
  </script>
  <script>
  export default {
    name: 'introCard',
  };
  </script>
  <style scoped>
  .chart-container {
    padding: 20px;
  }
  
  .chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .chart-card {
    border: 1px solid #e4e7ed;
    border-radius: 6px;
    padding: 20px;
  }
  
  .chart-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .chart-name {
    font-size: 16px;
    color: #303133;
  }
  
  .chart-version {
    font-size: 12px;
    color: #606266;
    background-color: #ecf5ff;
    padding: 2px 6px;
    border-radius: 3px;
  }
  
  .view-btn {
    padding: 6px 12px;
    background-color: #f0f2f5;
    color: #606266;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  </style>